home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / edit / aurora2.zip / TRAN.AML < prev    next >
Text File  |  1995-01-26  |  3KB  |  92 lines

  1.  
  2. // ───────────────────────────────────────────────────────────────────
  3. // The Aurora Editor v2.0
  4. // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
  5. //
  6. // Translation definitions (included by MAIN.AML)
  7. //
  8. // To change a translation definition, simply locate the desired word
  9. // and it's substitution text and change them in the table. You can also
  10. // add new entries to the table. Be sure to enclose both the word and
  11. // the substitution text in quotes.
  12. //
  13. // If you have made any changes, save this file and select 'Recompile
  14. // the Editor' <alt f2> from the Set menu. Exit and re-enter the
  15. // editor for your changes to take effect.
  16. //
  17. // Note: The text translations and macros listed here are only
  18. // examples. Replace them with your own.
  19. // ───────────────────────────────────────────────────────────────────
  20.  
  21.   // translation object
  22.   object  tran
  23.  
  24.   // When translation is ON, words in the left column are replaced
  25.   // with the phrases in right column as-you-type. To turn translation
  26.   // ON and OFF, select 'Translate' from the Set menu.
  27.  
  28.   // Words defined with a '*' suffix are translated only when a word
  29.   // delimiter character is entered. The rest are translated when the
  30.   // last character of the word is entered.
  31.  
  32.   //   Word:             Replace with:
  33.   //   ────              ────────────
  34.   set "adn"             "and"
  35.   set "asap"            "as soon as possible"
  36.   set "aurora"          "The Aurora Editor"
  37.   set "btw"             "by the way,"
  38.   set "don;t"           "don't"
  39.   set "etc"             "et cetera"
  40.   set "i*"              "I"
  41.   set "imho"            "In my humble opinion,"
  42.   set "incl"            "include"
  43.   set "occurence"       "occurrence"
  44.   set "recieve"         "receive"
  45.   set "teh"             "the"
  46.   set "yn"              "your name"
  47.  
  48.  
  49.   // Macro Translations ─────────────────────────────────────────────────
  50.  
  51.   // If translation is ON, these macros are executed when you type the
  52.   // macro name as a word in your text. Note that macro functions
  53.   // defined in this object cannot call each other - this object is for
  54.   // lookup only.
  55.  
  56.   // type the word 'bip' and a space to beep the PC speaker
  57.   function "bip*"
  58.     beep 800 100
  59.   end
  60.  
  61.   // type the word 'dt' to enter the date and time at the cursor
  62.   function  dt
  63.     prevword         // find the left word ('dt')
  64.     delword          // delete the word 'dt' just entered
  65.     timestamp        // enter the date/time stamp
  66.   end
  67.  
  68.   // type the word 'txx' on a blank line to replace the current line
  69.   // with text from a file (replace c:\your.txt with the name of
  70.   // your text file).
  71.  
  72.   function  txx
  73.     // include the file after the cursor
  74.     if open "c:\\your.txt" 'i' then
  75.       // delete current line if successful
  76.       delline
  77.     end
  78.   end
  79.  
  80.   // type the word 'ifs' to generate a C-language 'if' structure
  81.   // on the current line
  82.  
  83.   function  ifs
  84.     prevword            // find the left word ('ifs')
  85.     delword             // delete the word 'ifs' just entered
  86.     write "if ( ) {"    // write 'if', parens, and bracket
  87.     insline2            // insert a line with autoindent
  88.     write '}'           // write a closing bracket
  89.     movepos 3 -1        // move the cursor between the parens
  90.   end
  91.  
  92.